<template>
  <div class="page-container">
    <!--表格内容栏-->
    <ac-table ref="dataTable"
      pkName="id" 
      :filters="filters" 
      :filterFields="filterFields"
      :columns="columns"
    ></ac-table>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import tool from "@/utils/tool";

const filters = ref({
  name: '',
  code: ''
});
const filterFields = ref([
  {prop: "userName", label: "登录人员"},
  {prop: "loginType", label: "登录类型"}
]);
const columns = ref([
  {prop: "userName", label: "登录人员", width: 220, formatter: (prop, value, row) => {
      return value + (row.orgName ? ('（' + row.orgName + '）') : '');
    }
  },
  {prop: "createTime", label: "登录时间", width: 160, type: "datetime"},
  {prop: "loginType", label: "登录类型", width: 120},
  {prop: "ipAddress", label: "IP地址", width: 120},
  {prop: "browserInfo", label: "浏览器信息", minWidth: 120},
  {prop: "operateInfo", label: "操作信息", width: 120},
  {prop: "takeTime", label: "耗时", width: 120, formatter: (prop, value) => tool.formatTime(value)}
]);
</script>